<table>

    <thead>
	<tr>
	    <th i18n:translate="string:Role" class="lalign"/>
	    <th tal:repeat="privilege privileges" tal:content="privilege" class="calign" />
	</tr>
    </thead>

    <tbody>
	<tr tal:repeat="role roles">
	    <td>
		<input type="hidden" name="role_permissions[role][]" tal:attributes="value role/role_id"/>
		<tal:block tal:content="role/name|default" class="lalign"/>
	    </td>
	    <td tal:repeat="privilege privileges" class="calign">
		<input type="checkbox" tal:attributes="name string:role_permissions[privilege][${role/role_id}][];value privilege;checked php:this.checked(this.hasPermission(array('resource' => resource, 'privilege' => privilege), role))"/>
	    </td>
	</tr>
    </tbody>

</table>